<template>
    <div>
        <van-nav-bar title="标题" left-text="返回" left-arrow @click-left="()=>{$router.back()}" />
        <div v-for="item in wgq">
            <router-link :to="'/xqy/' + item.goods_id">
                <van-card  :price="item.goods_price"  :title="item.goods_name"
                    :thumb="item.goods_big_logo ? item.goods_big_logo : 'https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg'" />
            </router-link>

        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue'
import { searchApi } from '@/api/api'
let wgq = ref([])
import { useRoute } from 'vue-router'
let route=useRoute()
searchApi(route.params.cat_name).then(res => {
    console.log('列表', res)
    wgq.value = res.data.message.goods
})
</script>

<style lang="scss" scoped></style>